package cn.controller.marketing;

import cn.service.marketingService.MarketingServiceImpl.BrandMarketingServiceImpl;
import entity.marketingEntity.BrandMarketingCondition;
import entity.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 朱颢阳
 * @description
 * @time 2024/8/29 16:44
 */
@RestController
@CrossOrigin
@RequestMapping("/marketing")
public class BrandMarketingController {
    @Autowired
    BrandMarketingServiceImpl service;
    @RequestMapping("/getBrandMarking")
    public Result getBrandMarking(@RequestBody BrandMarketingCondition condition){
        return service.getBrandMarking(condition);
    }
    @RequestMapping("/updateBrandMarkingRecommend")
    public Result updateBrandMarkingRecommend(Integer id,Integer recommend){
        return service.updateBrandMarkingRecommend(id,recommend);
    }
    @RequestMapping("/updateBrandMarkingSort")
    public Result updateBrandMarkingSort(Integer id,Integer sort){
        return service.updateBrandMarkingSort(id,sort);
    }
    @RequestMapping("/addBrandMarketing")
    public Result addBrandMarketing(@RequestBody List<String> list){
        return service.addBrandMarketing(list);
    }
    @RequestMapping("/deleteBrandMarketing")
    public Result deleteBrandMarketing(Integer id){
        return service.deleteBrandMarketing(id);
    }

}
